package com.charger.chargingcable.service.impl;

import com.charger.chargingcable.domain.Chargingcable;
import com.charger.chargingcable.mapper.ChargingcableMapper;
import com.charger.chargingcable.service.IChargingcableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 充电枪Service业务层处理
 * 
 * @author charger1
 * @date 2024-11-26
 */
@Service
public class ChargingcableServiceImpl implements IChargingcableService 
{
    @Autowired
    private ChargingcableMapper chargingcableMapper;

    /**
     * 查询充电枪
     * 
     * @param chargingcableId 充电枪主键
     * @return 充电枪
     */
    @Override
    public Chargingcable selectChargingcableByChargingcableId(Long chargingcableId)
    {
        return chargingcableMapper.selectChargingcableByChargingcableId(chargingcableId);
    }

    /**
     * 查询充电枪列表
     * 
     * @param chargingcable 充电枪
     * @return 充电枪
     */
    @Override
    public List<Chargingcable> selectChargingcableList(Chargingcable chargingcable)
    {
        return chargingcableMapper.selectChargingcableList(chargingcable);
    }

    /**
     * 新增充电枪
     * 
     * @param chargingcable 充电枪
     * @return 结果
     */
    @Override
    public int insertChargingcable(Chargingcable chargingcable)
    {
        return chargingcableMapper.insertChargingcable(chargingcable);
    }

    /**
     * 修改充电枪
     * 
     * @param chargingcable 充电枪
     * @return 结果
     */
    @Override
    public int updateChargingcable(Chargingcable chargingcable)
    {
        return chargingcableMapper.updateChargingcable(chargingcable);
    }

    /**
     * 批量删除充电枪
     * 
     * @param chargingcableIds 需要删除的充电枪主键
     * @return 结果
     */
    @Override
    public int deleteChargingcableByChargingcableIds(Long[] chargingcableIds)
    {
        return chargingcableMapper.deleteChargingcableByChargingcableIds(chargingcableIds);
    }

    /**
     * 删除充电枪信息
     * 
     * @param chargingcableId 充电枪主键
     * @return 结果
     */
    @Override
    public int deleteChargingcableByChargingcableId(Long chargingcableId)
    {
        return chargingcableMapper.deleteChargingcableByChargingcableId(chargingcableId);
    }
}
